home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / lib / partman / check.d / 09nomountpoint_ext3 < prev    next >
Text File  |  2009-10-28  |  1KB  |  41 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. for dev in $DEVICES/*; do
  6.     [ -d "$dev" ] || continue
  7.     cd $dev
  8.     partitions=
  9.     open_dialog PARTITIONS
  10.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  11.         [ "$fs" != free ] || continue
  12.         partitions="$partitions $id,$num"
  13.     done
  14.     close_dialog
  15.  
  16.     for part in $partitions; do
  17.         id=${part%,*}
  18.         num=${part#*,}
  19.         [ -f $id/method ] || continue
  20.         [ -f $id/acting_filesystem ] || continue
  21.         filesystem=$(cat $id/acting_filesystem)
  22.         case "$filesystem" in
  23.             ext3|ext4)
  24.             [ ! -f "$id/mountpoint" ] || continue
  25.             RET=''
  26.             db_metaget partman/filesystem_short/"$filesystem" description || RET=''
  27.             [ "$RET" ] || RET="$filesystem"
  28.             db_subst partman-ext3/no_mount_point PARTITION "$num"
  29.             db_subst partman-ext3/no_mount_point FILESYSTEM "$filesystem"
  30.             db_subst partman-ext3/no_mount_point DEVICE $(humandev $(cat device))
  31.             db_input critical partman-ext3/no_mount_point || true
  32.             db_go || exit 1
  33.             db_get partman-ext3/no_mount_point
  34.             if [ "$RET" = true ]; then
  35.                 exit 1
  36.             fi
  37.             ;;
  38.         esac
  39.     done
  40. done
  41.